<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd"
    >
<html lang="zh-CN">
<head>
    <meta charset="UTF-8" />
    <title>{{ handler.settings.site_name }} › {% block title %}{% end %}</title>
    <!-- some css classes/images from v2ex -->
    <link rel="stylesheet" type="text/css" media="screen" href="{{ static_url('css/style.min.css') }}" />
    <link href="{{ static_url('img/favicon.ico') }}" rel="icon" type="image/x-icon" />
    <link href="" rel="icon" type="image/x-icon" />
    {% block css %}{% end %}
    <link  href="http://fonts.googleapis.com/css?family=Philosopher:regular" rel="stylesheet" type="text/css" >
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js" type="text/javascript"></script>

    <script src="{{ static_url('js/jquery.notifybar.min.js') }}" type="text/javascript"></script>
    <script src="{{ static_url('js/ajax.js') }}" type="text/javascript"></script>
    {% block js %}{% end %}
    <!--[if lte IE 7]>
    <link rel="stylesheet" type="text/css" media="screen" href="{{ static_url('css/ie7.css') }}" />
    <![endif]-->
</head>
<body>
    <!--[if lte IE 6]>
    <h1><center>我们已经不支持IE 6了, 请使用Chrome或者FireFox!</center></h1>
    <![endif]-->
    <div id="header">
        <a href="#;" name="_top"></a> 
        <div id="nav"> 
            <a href="{{ reverse_url('main') }}" id="logo">{{ handler.settings.site_name }}<a/>
            <div id="navigation"> 
                <ul>
                    <li><a href="{{ reverse_url('main') }}" class="white">首页</a></li> 
                    {% if current_user %}
                    <li><a href="{{ reverse_url('member', current_user['account']) }}" class="white">{{ escape(current_user['account']) }}</a></li>
                    <li><a href="{{ reverse_url('setting') }}" class="white">设置</a></li>
                    <li><a href="{{ reverse_url('fg') }}" class="white">富光</a></li>
                    {% if 'root' in current_user['role'] %}<li><a href="{{ reverse_url('manage_user') }}" class="white">管理</a></li>{% end %}
                    <li><a href="{{ reverse_url('signout') }}" class="white">退出</a></li> 
                    {% else %}
                    <li><a href="{{ reverse_url('signin') }}" class="white">登录</a></li>
                    {% end %}
                </ul>
            </div>
            <div id="search">
                <form>
                    <input type="text" class="search" maxlength="40" name="q" value="" id="q" />
                    <input type="submit" class="super normal button" value="搜索" style="-moz-border-radius: 0px 5px 5px 0px; border: none;" />
                </form>
            </div> 
        </div> 
    </div>
    
    <div id="wrapper">
	<div id="main">
	    <div id="aside">
                {% if not current_user %}
                {% include "right/right_login.html" %}
                {% else %}
                {% include "right/right_user.html" %}
                {% end %}
                {% block right %}{% end %}
	    </div>
	    <div id="content">
		{% block content %}{% end %}
	    </div>
	</div>
    </div>
    
    <div id="footer">
        <div id="bottom">
            <div class="fr" align="right" style="padding-top: 10px;">
                <a href="http://www.python.org/" target="_blank">python</a> | 
                <a href="http://twistedmatrix.com/trac/" target="_blank">twisted</a> |
                <a href="https://github.com/fiorix" target="_blank">fiorix</a>
            </div>
            
            <strong><a href="http://www.fuguangchina.com" target="_blank" class="dark">富光</a></strong>&nbsp; | &nbsp;
            <strong><a href="#" class="dark">富光爱德</a></strong>&nbsp; | &nbsp;
            <strong><a href="https://github.com/zyyang/ideaplus" target="_blank" class="dark">开源</a></strong>&nbsp; | &nbsp;
            <strong><a href="#" class="dark">帮助</a></strong>&nbsp; | &nbsp;
            <strong><a href="#" class="dark">关于</a></strong>
            <div class="sep5"></div>
            <span class="fade">From <a href="http://www.pinpin.us/" target="_blank" class="dark"><strong>d_yang</strong></a></span> • 
            <span class="fade">Css based on <a href="http://www.v2ex.com/" target="_blank" class="dark"><strong>v2ex</strong></a></span> • 
            {% if current_user %}
            <span class="fade" style="font-size:10px;">
                最后登于 {{ current_user.get('last_login', '现在') }}
                自 {{ current_user.get('last_login_ip', '127.0.0.1') }}
                {%if current_user.get('last_login_ip', '127.0.0.1') != '127.0.0.1' %}
                ({{ handler.settings.geoip.getIpAddr(current_user['last_login_ip']) }})
                {% end %}
             </span>
            {% end %}
        </div>
    </div>

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-22806565-1']);
  _gaq.push(['_setDomainName', '.ide.fm']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
</body>

</html>
